/* The code in this file is mostly taken from
 * http://blog.enthought.com/python/numpy-arrays-with-pre-allocated-memory/
 */
#ifndef AUTODEALLOC_NUMPY_H
#define AUTODEALLOC_NUMPY_H

#include"Python.h"
#include<numpy/arrayobject.h>
#include<assert.h>
#include"pyr_error.h"

typedef struct {
	PyObject_HEAD
	void *memory;
} AutoDeallocObject;

PyObject *  createAutoDeallocNumpyArray (int nd, npy_intp* dims, int typenum, void *data);
void 		import_autodealloc_numpy    (void);

#endif //AUTODEALLOC_NUMPY_H
